﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;
using Newtonsoft.Json;

public partial class _Default :Basic
{
    public string strYmdt = "";

    protected void Page_Load(object sender, EventArgs e)
    {
        strYmdt = sb益盟动态().ToString();
    }

    /// <summary>
    /// 益盟动态0401
    /// </summary>
    /// <returns></returns>
    protected StringBuilder sb益盟动态()
    {
        StringBuilder sb = new StringBuilder();
        try
        {
            string url = jsonUrl + "news/NewsListMany.ashx?typeid=0401&top=9";
            string str = Pub.LoadData(url);
            List<NewsList> list = JsonConvert.DeserializeObject<List<NewsList>>(str);
            foreach (var item in list)
            {
                sb.Append("<ul class=\"idx_news_ul\">");
                for (int i = 0; i < item.list.Length; i++)
                {
                    sb.AppendFormat("<li> ·<a href=\"NewsContent_{1}_{2}.shtml\">{0}</a> </li>", item.list[i].Title, item.list[i].Id, item.typeid);
                }
                sb.Append("</ul>");
            }
        }
        catch
        { }
        return sb;
    }

}